package super1;

/**
 * @author shkstart
 * @date 2022/5/10 - 18:24
 */

public class Student extends Person{
    String major;
    int id = 1001;

    public Student(){

    }

    public Student(String major) {
        this.major = major;
    }
    public Student(String name,int age,String major) {
        super(name,age);
        this.major = major;


    }

    public void eat() {
        System.out.println("吃有营养的");
    }

    public void study() {
        System.out.println("学习知识");
        super.eat();
        this.eat();
    }

    public void show() {
        System.out.println("name = " + name + ",age = " + super.age );
        System.out.println("id = " + this.id);
        System.out.println("id =" + super.id);
    }



}
